package testcasetool.transformation.uml.activity;

import java.util.ArrayList;
import java.util.List;

public abstract class ActivityNode {
	
	private List<ActivityEdge> incomings = new ArrayList<ActivityEdge>();
	private List<ActivityEdge> outgoings = new ArrayList<ActivityEdge>();
	
	
	public List<ActivityEdge> getOutgoings() {
		return outgoings;
	}
	public void addOutgoing(ActivityEdge outgoing) {
		this.outgoings.add(outgoing);
	}
	public List<ActivityEdge> getIncomings() {
		return incomings;
	}
	public void addIncoming(ActivityEdge incoming) {
		this.incomings.add(incoming);
	}
	public void connect(ActivityNode activityNode) {
		this.connect(activityNode, null);
	}
	
	public void connect(ActivityNode activityNode, String guard) {
		ActivityEdge edge = new ActivityEdge(guard);
		edge.setSource(this);
		edge.setTarget(activityNode);
		this.addOutgoing(edge);
	}



}
